<template>
  <section><ZuiUserPicker class="user-picker" :search="onSearch" :disabled-user-ids="['1']" /></section>
</template>

<script setup>
function onSearch(searchText, resolve) {
  console.log('searchText :>> ', searchText)
  setTimeout(function () {
    resolve({
      total: 2,
      records: [
        { id: '1', name: '张三', avatarUrl: '' },
        { id: '2', name: '李四', avatarUrl: '' },
        {
          id: '3',
          name: '王五',
          avatarUrl: 'https://www.nmgalx.cn:42161/nmga_pub/731a81ec-8ed1-48c3-a01d-75011ae36b31.jpg'
        }
      ]
    })
  }, 2000)
}
</script>

<style lang="scss" scoped>
section {
  height: 500px;
  margin-top: 8px;
  padding: 10px;
  box-sizing: border-box;
}
.user-picker {
  height: 100%;
  border: 1px solid var(--zui-color-border);
  border-radius: var(--zui-size-border-radius-small);
}
</style>
